package com.newdjk.newdoctor.adapter;


import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.google.gson.Gson;
import com.newdjk.newdoctor.MyApplication;
import com.newdjk.newdoctor.R;
import com.newdjk.newdoctor.entity.AppLicationEntity;
import com.newdjk.newdoctor.utils.AppLicationUtils;
import com.newdjk.newdoctor.utils.GlideUtils;
import com.newdjk.okhttp.entity.HotShopEntity;

import java.util.List;

public class HotShopAdapter extends BaseQuickAdapter<HotShopEntity.ReturnDataBean.MedicationListBean, BaseViewHolder> {
    private String TAG = "MyDiagnoseImageAdapter";
    private Gson mGson;
    private List<HotShopEntity.ReturnDataBean.MedicationListBean> datalist;
    private int type=0;


    public HotShopAdapter(@Nullable List<HotShopEntity.ReturnDataBean.MedicationListBean> data) {
        super(R.layout.hot_function_item, data);

        datalist = data;
        mGson = new Gson();
        this.type=type;
    }

    @Override
    protected void convert(BaseViewHolder helper, final HotShopEntity.ReturnDataBean.MedicationListBean item) {


        ImageView avatar = helper.getView(R.id.im_picture);
        GlideUtils.loadMedicaineCommonmage(item.getPicturePath(),avatar);

        String medcineNmae=item.getTitle();
        helper.setText(R.id.tv_med_name,medcineNmae+"");
        String guige=item.getSupplierName();
        helper.setText(R.id.tv_guige,guige+"");
        String price=item.getPrice();
        helper.setText(R.id.tv_price,"￥"+price+"");

    }
}
